package core.objects.enums;

public enum NewsFeedEnum {

	LoanedFromMeLoaning(1),
	BookICommentedOnComment(2),
	UserICommentedOnComment(3),
	LentFromAreLoaningFrom(4),
	LentFromAreLoaningTo(5),
	LoanedFromMeLoaningTo(6),
	CommentsAboutMe(7),
	NewUser(8);
	
	private int type;
	
	private NewsFeedEnum(int type) {
		this.type = type;
	}
	
	public int get() {
		return type;
	}
	
    public static NewsFeedEnum parse(int type){
        for (NewsFeedEnum nfe : values()) {
            if (nfe.get() == type) {
            	return nfe;
            }
        }
        return null;
    }
}
